Real-time monitoring of hydrocarbon productions

ABSTRACT

A method includes obtaining a sample of a fluid from a subterranean zone while the fluid is being extracted from the zone. A chemical composition of the sample is measured. A temperature and a pressure of the subterranean zone are measured. The measured properties are associated with a time point. The measured properties are incorporated into a set of historical data. A chemical composition of a fluid to be extracted from the subterranean zone at a future time point is determined based on the set of historical data. A presence of a liquid phase in the fluid to be extracted from the subterranean zone at the future time point is determined. A flow rate of the fluid being extracted from the subterranean zone is adjusted in response to determining the presence of the liquid phase in the fluid to be extracted from the subterranean zone at the future time point.

CLAIM OF PRIORITY

This application is a continuation of and claims priority to U.S. patentapplication Ser. No. 15/861,400 filed on Jan. 3, 2018, the entirecontents of which are hereby incorporated by reference.

TECHNICAL FIELD

This specification relates to monitoring and controlling of fluidextraction from a subterranean zone, for example, monitoring thecomposition of a produced hydrocarbon gas.

BACKGROUND

Commercial-scale hydrocarbon production from source rocks and reservoirsrequires significant capital. It is therefore beneficial to obtain asmuch accurate data as possible about a formation in order to assess itscommercial viability and subsequently to optimize cost and design ofdevelopment. Data can be collected before production, such as duringdrilling and logging applications, and during production. Hydrocarbonmonitoring can be used to predict production, estimate reserves, andassess raw material quality of source rocks and reservoirs. Monitoringcan aid in preventive action. Potential or impending problems can bemitigated or prevented proactively in contrast to dealing with problemsreactively after process disruptions have already occurred. Exploration,reservoir management, and petrochemical manufacturing are a few of themany areas that can benefit from comprehensive hydrocarbon monitoringdata.

SUMMARY

The present specification describes technologies relating to monitoringand controlling of fluid extraction from a subterranean zone.

An example implementation of the subject matter described within thisdisclosure is a method for real-time monitoring of fluid extraction froma subterranean zone. A sample of a fluid from the subterranean zone isobtained while the fluid is being extracted from the subterranean zone.A chemical composition of the sample of the fluid is measured. Atemperature and a pressure of the subterranean zone are measured. By oneor more processors, the measured chemical composition, the measuredtemperature, and the measured pressure are associated with a time point.By one or more processors, the measured chemical composition, themeasured temperature, and the measured pressure are incorporated into aset of historical data. By one or more processors, a chemicalcomposition of a fluid to be extracted from the subterranean zone at afuture time point is determined based on the set of historical data. Apresence of a liquid phase in the fluid to be extracted from thesubterranean zone at the future time point is determined at least basedon the determined chemical composition. A flow rate of the fluid beingextracted from the subterranean zone is adjusted in response todetermining the presence of the liquid phase in the fluid to beextracted from the subterranean zone at the future time point.

Aspects of the example implementation, which can be combined with theexample implementation alone or in combination, include the following.

The method can include adjusting a mathematical model of the fluid basedon the set of historical data, where the mathematical model representsat least one of a temperature, a pressure, a composition, and a physicalproperty of the fluid.

The method can include using the model to determine a temperature and apressure of the subterranean zone at the future time point.

The chemical composition of the sample of the fluid can be measured byat least one of gas chromatography or mass spectrometry.

Measuring the chemical composition of the sample of the fluid caninclude measuring at least one of a mole fraction or a mass fraction ofa chemical species of the sample of the fluid.

Measuring the chemical composition of the sample of the fluid caninclude measuring at least one of a mole fraction or a mass fraction ofa group of chemical species of the sample of the fluid.

The model can be an auto-regressive neural network model.

Determining the presence of the liquid phase in the fluid to beextracted from the subterranean zone at the future time point caninclude determining a dew point pressure of the fluid to be extractedfrom the subterranean zone at the future time point. Determining thepresence of the liquid phase in the fluid to be extracted from thesubterranean zone at the future time point can include comparing thedetermined dew point pressure of the fluid to be extracted from thesubterranean at the future time point with the determined pressure ofthe subterranean zone at the future time point.

The dew point pressure can correspond to the measured temperature of thesubterranean zone.

The dew point pressure can correspond to the determined temperature ofthe subterranean zone at the future time point.

Another example implementation of the subject matter described withinthis disclosure is a system for real-time monitoring of fluid extractionfrom a subterranean zone. The system includes a temperature sensor thatcan measure a temperature of the subterranean zone, a pressure sensorthat can measure a pressure of the subterranean zone, a sampling devicethat can obtain a sample of a fluid extracted from the subterraneanzone, a measurement device coupled to the sampling device, at least onehardware processor, and a non-transitory computer-readable storagemedium coupled to the at least one hardware processor. The measurementdevice can measure a chemical composition of a sample obtained by thesampling device. The non-transitory computer-readable storage mediumstores programming instructions for execution by the at least onehardware processor, in which the programming instructions, whenexecuted, cause the at least one hardware processor to performoperations. The operations include associating a measured chemicalcomposition, a measured temperature, and a measured pressure with a timepoint. The operations include incorporating the measured chemicalcomposition, the measured temperature, and the measured pressure into aset of historical data. The operations include determining a chemicalcomposition of a fluid to be extracted from the subterranean zone at afuture time point based on the set of historical data. The operationsinclude determining a presence of a liquid phase in the fluid to beextracted from the subterranean zone at the future time point at leastbased on the determined chemical composition. The operations includetransmitting a signal that corresponds to a decrease in a flow rate ofthe fluid extracted from the subterranean zone based on a determinationof the presence of the liquid phase.

Aspects of the example implementation, which can be combined with theexample implementation alone or in combination, include the following.

The operations can include adjusting a mathematical model based on theset of historical data, where the mathematical model represents at leastone of a temperature, a pressure, a composition, and a physical propertyof the fluid.

The operations can include using the model to determine a temperatureand a pressure of the subterranean zone at the future time point.

The measurement device can include at least one of a gas chromatographor a mass spectrometer.

The measurement device can measure at least one of a mole fraction or amass fraction of a chemical species of the sample of the fluid.

The measurement device can measure at least one of a mole fraction or amass fraction of a group of chemical species of the sample of the fluid.

The model can be an auto-regressive neural network model.

Determining the presence of the liquid phase in the fluid to beextracted from the subterranean zone at the future time point caninclude determining a dew point pressure of the fluid to be extractedfrom the subterranean zone at the future time point. Determining thepresence of the liquid phase in the fluid to be extracted from thesubterranean zone at the future time point can include comparing thedetermined dew point pressure of the fluid to be extracted from thesubterranean zone at the future time point with the determined pressureof the subterranean zone at the future time point.

The dew point pressure can correspond to the measured temperature of thesubterranean zone.

The dew point pressure can correspond to the determined temperature ofthe subterranean zone at the future time point.

The details of one or more implementations of the subject matter of thisspecification are set forth in the accompanying drawings and thedescription. Other features, aspects, and advantages of the subjectmatter will become apparent from the description, the drawings, and theclaims.

DESCRIPTION OF DRAWINGS

FIG. 1 is an example of a well.

FIG. 2 is a flow chart illustrating an example method for monitoringfluid extraction from a subterranean zone.

FIG. 3 is a flow chart illustrating an example method for monitoringfluid extraction from a subterranean zone.

FIG. 4 is a flow chart illustrating an example method for monitoringfluid extraction from a subterranean zone.

FIG. 5 is a flow chart illustrating an example method for monitoringfluid extraction from a subterranean zone.

FIG. 6 is a block diagram illustrating an example computer used toprovide computational functionalities.

DETAILED DESCRIPTION

Gas-condensate reservoirs are reservoirs that contain hydrocarbonmixtures that, upon pressure depletion, cross the dewpoint curve (thatis, the pressure decreases to a pressure that is less than the dewpointpressure). A gas condensate is a single-phase fluid at originalreservoir conditions. Gas condensate consists predominantly of methanebut also contains other hydrocarbons. Under certain conditions oftemperature and pressure, a gas condensate can separate into two phases,a gas and a liquid that is called a retrograde condensate. Ashydrocarbons are extracted from a reservoir (for example, using a well),the temperature of the subterranean zone does not substantially change,but the pressure decreases. When the pressure in a gas-condensatereservoir decreases to a certain point (called the saturation pressureor the dewpoint), a liquid phase that is rich in heavy ends (that is,molecular compounds with a heavier molecular weight than methane, suchas heptane and octane) can drop out of solution as a liquid phase. Inthis description, the terms “light” and “heavy” describe molecularweights of chemical species. For example, methane is lighter thanpropane because methane has a lighter molecular weight than propane;inversely, propane is heavier than methane because propane has a heaviermolecular weight than methane. The amount of liquid phase presentdepends not only on pressure and temperature, but also on thecomposition of the fluid.

Condensate liquid saturation can accumulate near a well due to drawdown(the difference between the average reservoir pressure and the flowingbottomhole pressure) less than the dewpoint pressure and can ultimatelyrestrict the flow of gas. This choking (also referred as condensateblockage or condensate banking) can significantly reduce theproductivity of a well. The choking effectively reduces the relativepermeability of the gaseous phase. Relative permeability is a propertythat measures the relative ease of movement of one phase in the presenceof another phase through a porous medium, such as reservoir rock.Reservoir pressure decreasing to a pressure that is less than thedewpoint can also cause the produced gas to contain less of the valuableheavy ends due to the heavy ends dropping out throughout the reservoirand the condensate having insufficient mobility to flow toward aproducing well. Various factors contribute to condensate banking, suchas fluid phase properties, formation flow characteristics, and pressureswithin the formation and in the wellbore. A direct method of reducingcondensate buildup is to reduce the drawdown pressure, such that thebottomhole pressure remains greater than the dewpoint of the fluid beingextracted from the reservoir. Other methods can be used to mitigate,remediate, or remove condensate blockage once it has occurred, butcondensate banking is unavoidable once the dewpoint has been crossed.Examples of some methods are as injection of surfactants mixed withsolvents to alter wettability of the reservoir, cyclic injection andproduction from the well (also referred as “huff and puff” treatmentemploying dry gas to vaporize condensate around the well), hydraulicfracturing, and acidizing.

In some implementations of the techniques described in the presentspecification, real-time monitoring of a composition of produced gasfrom a reservoir at the well head using gas chromatography and massspectrometry can be used to predict retrograde gas condensate banking.The real-time data collected (and historical data) can be incorporatedinto an autoregressive neural network model to forecast compositions andcorresponding dew point pressures, in comparison to predictedbottom-hole temperatures and pressures. In this specification,“real-time” is defined as the time during which fluid is being extractedfrom a subterranean zone. Heavier gases (that is, gases with heaviermolecular weight) tend to reach their dew point at decreased pressuresthan lighter gases and are therefore more susceptible to liquefy inproducing zones. By predicting condensate banking using the model, athrottle valve that controls gas production rate can be automaticallyactuated to reduce the gas production rate in order to mitigate theonset of condensate banking or at least until a treatment operation canbe scheduled. The reduction in gas production rate can delay the onsetof condensate banking, thereby providing production engineers additionaltime to investigate and make operational changes to prevent thepredicted problems.

FIG. 1 illustrates an example of a hydrocarbon extraction system 10including a well 12. The well 12 can be in a wellbore 20 formed in asubterranean zone 14. The subterranean zone 14 can include, for example,a formation, a portion of a formation, or multiple formations in ahydrocarbon-bearing reservoir from which recovery operations can bepracticed to recover trapped hydrocarbons. In some implementations, thesubterranean zone 14 includes an underground formation of naturallyfractured or porous rock containing hydrocarbons (for example, oil, gas,or both). For example, the subterranean zone 14 can include a fracturedshale. In some implementations, the well 12 can intersect other suitabletypes of formations, including reservoirs that are not naturallyfractured in any significant amount.

The well 12 can include a casing 22 and well head 24. The wellbore 20can be a vertical, horizontal, deviated, or multilateral bore. Thecasing 22 can be cemented or otherwise suitably secured in the well bore12. Perforations 26 can be formed in the casing 22 at the level of thesubterranean zone 14 to allow oil, gas, and by-products (such asproduced water) to flow into the well 12 and be produced to the surface25. Perforations 26 can be formed using a perforating gun with shapedcharges, or otherwise. In some cases, the well 12 is completed openholewithout a casing. The production zone can be in a lower, openholesection of the well 12 without casing. In some implementations, the wellhead 24 can include a sampling system.

A work string 30 can be disposed in the well bore 20. The work string 30can be coiled tubing, sectioned pipe or other suitable tubing. Packers36 can seal an annulus 38 of the well bore 20 uphole of and down hole ofthe subterranean zone 14. Packers 36 can be mechanical, fluid inflatableor other suitable packers. One or more pump trucks 40 can be coupled tothe work string 30 at the surface 25. The pump trucks 40 pump fluid downthe work string 30, for example, to pump cement into the well bore 20for completions or to pump injection fluids into the well bore 20 tostimulate production. The pump trucks 40 can include mobile vehicles,equipment such as skids or other suitable structures.

A control system 600 (additional details shown in FIG. 6) can also beprovided at the surface 25. The control system 600 can monitor andcontrol the pump trucks 40 and fluid valves, for example, to stop,start, and regulate pumping fluid into the well bore 20. The controlsystem 600 can control hydrocarbon production of the well 12, forexample, by adjusting a flow control device 70 (such as a valve orchoke) located at the surface 25. The control system 600 communicateswith surface and subsurface instruments to monitor and control aprocess, such as a well treatment process or hydrocarbon extractionprocess. In some implementations, the surface and subsurface instrumentsinclude surface sensors 48, down-hole pressure sensor 50 that canmeasure a pressure of the subterranean zone 14, down-hole temperaturesensor 51 that can measure a temperature of the subterranean zone 14,and pump controls 52. The system 10 can include more than one pressuresensor 50 and more than one temperature sensor 51, such that multiplesensors can be disposed at varying depths within the well 12 in order toobtain more comprehensive data about the subterranean zone 14. Thesystem 10 can include a sampling device 60 at or near the well head 24.The sampling device 60 can obtain a sample of a fluid extracted from thesubterranean zone 14. A measurement device 62 can be coupled to thesampling device 60, and the measurement device 62 can be used to measurea chemical composition of a sample obtained by the sampling device 60.The measurement device 62 is a mass spectrometer, a gas chromatograph,or a combination of both.

In some implementations, the control system 600 includes at least onehardware processor and a non-transitory computer-readable storage mediumcoupled to the at least one hardware processor. The non-transitorycomputer-readable storage medium stores programming instructions forexecution by the at least one hardware processor, and the programminginstructions, when executed, cause the at least one hardware processorto perform operations. Alternatively, or in addition, the control system600 can be implemented as processing circuitry (for example, hardware,firmware, electronic components, or combinations of them) that canperform operations.

The operations include associating a measured chemical composition, ameasured temperature, and a measured pressure with a time point. Theoperations can include incorporating the measured chemical composition,the measured temperature, and the measured pressure into a set ofhistorical data. The operations can include determining a chemicalcomposition of a fluid to be extracted from the subterranean zone 14 ata future time point based on the set of historical data. The operationscan include determining a presence of a liquid phase in the fluid to beextracted at least based on the determined chemical composition. Theoperations can include transmitting a signal that corresponds to adecrease in a flow rate of the fluid extracted from the subterraneanzone 14 based on a determination of the presence of the liquid phase.The hydrocarbon extraction system 10 can be used to monitor hydrocarbonproduction, such as method 200 illustrated in FIG. 2 and describedsubsequently.

FIG. 2 is a flow chart illustrating a method 200 for monitoringhydrocarbon production. At 201, a sample of fluid is obtained from asubterranean zone while the fluid is being extracted from thesubterranean zone. A subterranean zone can be a formation, a portion ofa formation, or multiple formations in a hydrocarbon-bearing reservoir.For example, the fluid being extracted from the subterranean zone can bea gaseous mixture of hydrocarbons. The sample of fluid can be obtainedat a surface location, for example, at the well head. The sample offluid can be obtained without interrupting the extraction of the fluidfrom the subterranean zone. For example, the sample of fluid can beobtained using the sampling device 60 installed on the well head 24. Thefrequency of sampling (201) can be once per day or faster (for example,once every 12 hours or once every 4 hours).

At 203, a chemical composition of the sample is measured. For example,the chemical composition of the sample is measured by the measurementdevice 62. In some implementations, the measurement device 62 measuresthe chemical composition of the sample within 15 to 30 minutes afterobtaining the sample of fluid at 201. The chemical composition of thesample can be measured using gas chromatography, mass spectrometry, or acombination of both. The measurement device 62 can measure at least oneof a mole fraction or a mass fraction of a chemical species of thesample. For example, the mole fractions of methane, ethane, and propaneof the sample can be measured using gas chromatography or massspectrometry. The measurement device 62 can measure at least one of amole fraction or a mass fraction of a group of chemical species of thesample. For example, the mole fractions of light components (such aspropane and components that are lighter than propane) and heavycomponents (such as hydrocarbons consisting seven carbon atoms or more)can be measuring used gas chromatography and mass spectrometry.

At 205, a temperature and a pressure of the subterranean zone ismeasured. The temperature of the subterranean zone 14 can be measuredusing, for example, the temperature sensor 51 that is located downholewithin the subterranean zone 14. The pressure of the subterranean zone14 can be measured, for example, using the pressure sensor 50 that islocated downhole within the subterranean zone 14. The frequency oftemperature and pressure measurement (205) can be faster than thefrequency of sampling (201). As one example, the temperature andpressure can be measured once every 15 minutes.

Steps 207A, 207B, 207C, and 207D can be performed by one or moreprocessors (for example, the processor 605 of the control system 600).At 207A, the measurements (such as temperature, pressure, and chemicalcomposition) are associated with a time point (such as a current timepoint). In cases where temperature and pressure are measured at a fasterfrequency than sampling of the produced fluid, the multiple temperatureand pressure measurements can be averaged and associated with the sametime point that is associated with a fluid sample. For example, if theproduced fluid is sampled once every 4 hours, and the temperature andpressure are measured once every 30 minutes, there can be 8 temperatureand pressure measurements taken between a first fluid sampling and asecond fluid sampling. The 8 temperature and pressure measurements canbe averaged and associated with either the first fluid sampling or thesecond fluid sampling. At 207B, the measurements (along with theassociated time point) are incorporated into a set of historical data.The set of historical data can be incorporated into a mathematical model(described in more detail later). The set of historical data can includeat least a week's worth of historical data. Increasing amounts ofhistorical data (for example, 1 month's to 4 months' worth of historicaldata) can improve the accuracy of the mathematical model. Themathematical model can represent a temperature of a fluid, a pressure ofa fluid, a composition of a fluid, a physical property of a fluid, orcombinations of these. In some cases, the mathematical model includes anon-linear autoregressive neural network model. An autoregressive neuralnetwork model is a neural network model that can be trained to predict atime series from the past values of the series. For non-linearautoregressive neural network models, the unknown variables appear asvariables of a polynomial of degree higher than one or appear in theargument of a function, which is not a polynomial of degree one;therefore, the change in output is not proportional to the change ininput. In other words, non-linear systems cannot be written as a linearcombination of the unknown variables or functions that appear in thesystem. In some cases, the mathematical model includes an equation ofstate (EOS) model. The model can be used to determine phase equilibriaof a fluid based on composition and operating conditions, such astemperature and pressure. In some cases, the measurements obtained at203 and 205 or the set of historical data can be used to adjust themathematical model. For example, the mathematical model can include anerror component, and the set of historical data can be used to adjustthe mathematical model, such that the error component decreases. Incases where data about the subterranean zone from which fluid is beingextracted is available, this data can be used to calibrate or adjust themathematical model. In cases where data about the subterranean zone fromwhich fluid is being extracted is not available, data from nearbysubterranean zones can be used to calibrate or adjust the mathematicalmodel as an initial point.

At 207C, a chemical composition of the fluid to be extracted at a futuretime point is determined (that is, a chemical composition of a fluidthat will be extracted from the subterranean zone at a future timeinstant relative to a present time instant or to a time instant at whichthe sample was collected). For example, the future time point can be 7days in the future from the present time or from the time instant atwhich the sample was collected at 201. The mathematical model can beused to determine the chemical composition of the fluid to be extractedat the future time point based on the set of historical data. Themathematical model can also be used to determine (that is, predict) thetemperature and pressure of the subterranean zone at the future timepoint based on the set of historical data. The mathematical model caninclude a set of functions that can determine chemical composition ofthe fluid to be extracted at a future time point based on the chemicalcomposition of the current time point, previous time points (that is, aportion or all of the set of historical data), or combinations of these.For example, the mathematical model can include a set of functions thattake current and past measurements of chemical composition to determinea chemical composition of the fluid to be extracted at a future timepoint (that is, the fluid that will be extracted from the subterraneanzone). The mathematical model can include a set of functions that takecurrent and past measurements of temperature (or pressure) to determinea temperature (or pressure) of the subterranean zone at a future timepoint.

At 207D, a presence of a liquid phase in the fluid to be extracted fromthe subterranean zone (at a future time point) is determined. In somecases, in order to determine the presence of the liquid phase in thefluid to be extracted, a dew point pressure of the fluid to be producedis determined at the determined temperature of the subterranean zone atthe future time point. The dew point pressure of the fluid to beextracted can be determined using the mathematical model (described inmore detail later). To determine the presence of the liquid phase in thefluid to be extracted, the determined dew point pressure of the fluid tobe extracted can be compared with the determined pressure of thesubterranean zone at the future time point. If the determined pressureof the subterranean zone at the future time point is less than or equalto the determined dew point pressure of the fluid to be extracted, thenit can be concluded that a liquid phase is likely to be present in thefluid to be extracted. Otherwise, a liquid phase is likely to not bepresent in the fluid to be extracted. In such cases where a liquid phaseis determined to not be present in the fluid to be extracted, themonitoring can be repeated (that is, the method 200 can restart at 201).

At 209, in response to determining the presence of the liquid phase inthe fluid to be extracted, a flow rate of the fluid being extracted fromthe subterranean zone is adjusted before the future time point. Forexample, a throttle valve (such as the valve 70 in FIG. 1) whichcontrols the rate of production of the well can be adjusted, such thatthe production rate is reduced. For example, the control system 600 canautomatically drive the throttle valve to be adjusted based ondetermining the presence of the liquid phase in the fluid to beextracted. In some cases, the control system 600 automatically outputs anotification to direct an operator to adjust the throttle valve. Themethod 200 can then restart at 201. The flow rate of the fluid beingextracted from the subterranean zone can, for example, be abruptlydecreased (stepped down) once or multiple times until the evaluation ofthe fluid to be extracted determines that a liquid phase is likely notto be present in the fluid to be extracted. In some cases, the flow ratecan be decreased continuously and gradually until the evaluation of thefluid to be extracted determines that a liquid phase is likely not to bepresent in the fluid to be extracted. The method 200 can continue tocycle as long as fluid is being extracted from the subterranean zone.

The following EOS model is presented by Pedersen et al. in “PhaseBehavior of Petroleum Reservoir Fluids” (CRC Press, 2014) and is oneexample set of functions that the mathematical model can include. Insome implementations, the control system 600 can execute the EOS modelto implement some or all of the operations described earlier withreference to FIG. 2. Considering a fluid called Fluid A with ncomponents, the dew point pressure can be determined by solving thefollowing equation:

$\begin{matrix}{{\sum\limits_{i = 1}^{n}\frac{z_{i}}{K_{i}}} = 1} & (1)\end{matrix}$

where z_(i) is the overall mole fraction of the i-th component, andK_(i) is the distribution coefficient of the i-th component. Equation 1can be solved iteratively in the following steps.

Step 1: Assume a dew point pressure (P_(d)), and estimate distributioncoefficients by the following equation:

$\begin{matrix}{{\log \left( K_{i}^{j} \right)} = {{\log \left( \frac{P_{c,i}}{P_{d}^{j}} \right)} + {5.373\left( {1 + \omega_{i}} \right)\; \left( {1 - \frac{T_{c,i}}{T}} \right)}}} & (2)\end{matrix}$

where T is the bottomhole temperature, subscript i denotes the i-thcomponent, superscript j denotes the j-th iteration in solving Equation1 (not an exponent or power), P_(c) is the critical pressure, T_(c) isthe critical temperature, and ω is the acentric factor. P_(c), T_(c),and ω are parameters that can be adjusted (for individual chemicalspecies or groups of chemical species) to improve accuracy of the model.

Step 2: Estimate liquid phase composition by the following equation:

$\begin{matrix}{x_{i}^{j} = \frac{z_{i}}{K_{i}^{j}}} & (3)\end{matrix}$

where x is the mole fraction in the liquid phase, z is the overall molefraction, and K is the distribution coefficient.

Step 3: Estimate vapor phase fugacity coefficients (ϕ_(i) ^(V)) byassuming the vapor composition is equal to the overall composition(z_(i)), and estimate liquid phase fugacity coefficients (ϕ_(i) ^(L)) byusing the liquid composition (x_(i)) determined in Equation 3. Thefunctional forms of the fugacity coefficients depend on the type of EOSmodel chosen.

Step 4: Determine new distribution coefficients by the followingequation:

log(K _(i) ^(j+1))=log(ϕ_(i) ^(V))−log(ϕ_(i) ^(L))  (4)

Step 5: Determine an error value (F) by the following equation:

$F^{j} = {{\sum\limits_{i = 1}^{n}\frac{z_{i}}{K_{i}^{j + 1}}} - 1}$

Step 6: Determine error sensitivity to estimated dew point pressure bythe following equation:

$\begin{matrix}{\frac{\partial F^{j}}{\partial P_{d}} = {- {\sum\limits_{i = 1}^{n}{\frac{z_{i}}{K_{i}^{j + 1}}\left( {\frac{\partial{\log \left( \varphi_{i}^{V} \right)}}{\partial P_{d}} - \frac{\partial{\log \left( \varphi_{i}^{L} \right)}}{\partial P_{d}}} \right)}}}} & (5)\end{matrix}$

Step 7: Estimate the dew point pressure by utilizing the errorsensitivity (calculated in Equation 5) in the following equation:

$\begin{matrix}{P_{d}^{j + 1} = {P_{d}^{j} - \frac{F^{j}}{\frac{\partial F^{j}}{\partial P_{d}}}}} & (6)\end{matrix}$

Steps 2 through 7 can be iterated until the estimated dew point pressurehas converged to an acceptable tolerance (for example, when the errorsensitivity in Equation 5 is equal to or less than 10⁻⁶).

FIG. 3 is a flow chart illustrating a method 300 for monitoring fluidextraction from a subterranean zone, such as the subterranean zone 14. Asample of the extracted fluid can be obtained, for example, using thesampling device 60 installed on the well head 24 at the surface 25. At301, measurements of the chemical composition of the sample, atemperature of the subterranean zone 14, and a pressure of thesubterranean zone 14 are obtained. For example, the chemical compositionof the sample is obtained by utilizing the measurement device 62. Thechemical composition can be measured using gas chromatography, massspectrometry, or a combination of both. The chemical composition can bedetermined as a mixture of chemical species in mole or mass fractions.In some cases, chemical species that include hexane and moleculesheavier than hexane can be grouped together, for example, a C6+ group.The temperature can be measured, for example, by the temperature sensor51 located downhole within the subterranean zone 14. The pressure can bemeasured, for example, by the pressure sensor 50 located downhole withinthe subterranean zone 14.

Steps 303, 305, 307, 309, and 311 can be performed by one or moreprocessors (for example, the processor 605 of the control system 600).At 303, a mathematical model is tuned based on the measurements obtainedat 301. The mathematical model can be an EOS model, such asPeng-Robinson, Soave-Redlich-Kwong, or any derivatives or modifiedversions of these; examples can be found in the previously referencedbook, “Phase Behavior of Petroleum Reservoir Fluids,” by Pedersen et al.Tuning the mathematical model can involve adjusting an estimate oncertain parameters, for example, an estimated critical property (such ascritical temperature or critical pressure) of the C6+ group. In somecases, the mathematical model can be tuned less frequently in comparisonto the frequency of sampling of the fluid being extracted from thesubterranean zone 14.

At 305, the tuned mathematical model is used to determine a dew pointpressure (P_(d)) of the extracted fluid. The mathematical model caninclude some or all of Equations 1 through 6 (or variations of them),and in some cases, the dew point pressure can be determined byiteratively converging on a calculated value.

At 307, a chemical composition of the fluid to be extracted from thesubterranean zone 14, a temperature of the subterranean zone 14, and apressure (P₁) of the subterranean zone 14 (all associated with a futuretime point) are determined using a non-linear auto-regressive neuralnetwork model based on the data obtained at 301 and data obtainedpreviously. In some cases, a sensitivity of the dew point to thecomposition of the gas

$\left( \frac{\partial P_{d}}{\partial z_{i}} \right)$

is determined at the most recent (that is, current) sampled time point:

$\begin{matrix}{{\frac{\partial P_{d}}{\partial z_{i}} \approx \frac{{P_{d}\left( {z_{i} + {\Delta \; z_{i}}} \right)} - {P_{d}\left( z_{i} \right)}}{\Delta \; z_{i}}},{{{for}\mspace{14mu} i} = 1},\ldots \mspace{14mu},n} & (7)\end{matrix}$

where Δz_(i) is the difference between the determined future mole ormass fraction of the i-th component at 307 and the measured mole or massfraction of the i-th component at 301, and n is the total number ofdiscrete components (such as individual chemical species or groups ofchemical species) that make up the composition of the extracted fluid.

At 309, a future dew point pressure (P₂) of the fluid to be extractedfrom the subterranean zone 14 at the future point is determined usingthe following equation:

$\begin{matrix}{P_{2} = {P_{d} + {\sum\limits_{i = 1}^{n}{\left( \frac{\partial P_{d}}{\partial z_{i}} \right)\Delta \; z_{i}}}}} & (8)\end{matrix}$

At 311, the future dew point pressure (P₂) is compared to the futurepressure (P₁) of the subterranean zone 14. If the future pressure of thesubterranean zone 14 is greater than the future dew point pressure (thatis, if P₁>P₂), then the fluid extraction monitoring continues (that is,the method 300 returns to 301). If the future pressure of thesubterranean zone 14 is less than or equal to the future dew pointpressure (that is, if P₁<P₂), then the method 300 continues to 313.

At 313, a flow rate of fluid extraction from the subterranean zone 14 isadjusted. For example, a throttle valve (such as the valve 70 in FIG. 1)is adjusted to decrease the rate of fluid extraction from thesubterranean zone 14. The reduction of production rate can delayimpending condensate banking, which can give an operator more time toaddress the potential issue or a reservoir management team to exploreand plan alternative strategies for hydrocarbon production from thesubterranean zone 14. The method 300 can then return to 301. The method300 can continue to cycle as long as fluid is being extracted from thesubterranean zone

FIG. 4 is a flow chart illustrating a method 400 for monitoring fluidextraction from a subterranean zone, such as the subterranean zone 14. Asample of the extracted fluid can be obtained, for example, using thesampling device 60 installed on the well head 24 at the surface 25. At401, measurements of the chemical composition of the sample, atemperature of the subterranean zone 14, and a pressure of thesubterranean zone 14 are obtained. For example, the chemical compositionof the sample is obtained by utilizing the measurement device 62. Thechemical composition can be measured using gas chromatography and massspectrometry. The chemical composition can be determined as a mixture ofchemical species in mole or mass fractions. The temperature can bemeasured, for example, by the temperature sensor 51 located downholewithin the subterranean zone 14. The pressure can be measured, forexample, by the pressure sensor 50 located downhole within thesubterranean zone 14.

Steps 403, 405, 407, and 409 can be performed by one or more processors(for example, the processor 605 of the control system 600). At 403, themeasured chemical composition of the sample is split into two or morechemical groups. For example, the chemical composition can be split intothree groups. The first group can include light components, such ashydrogen sulfide (H₂S), carbon dioxide (CO₂), methane (C₁), C₂hydrocarbons (that is, hydrocarbons containing two carbon atoms, such asethane), and C₃ hydrocarbons (that is, hydrocarbons containing threecarbon atoms, such as propane). The second group can include heavycomponents, such as C₇₊ hydrocarbons (that is, hydrocarbons containingmore than seven carbon atoms, such as octane) and other chemical speciesheavier than heptane. The third group can include components that areheavier than the components of the first group but lighter than thecomponents of the second group, such as C₄ hydrocarbons (that is,hydrocarbons containing four carbon atoms, such as butane), C₅hydrocarbons (that is, hydrocarbons containing five carbon atoms, suchas pentane), C₆ hydrocarbons (that is, hydrocarbons containing sixcarbon atoms, such as hexane), and C₇ hydrocarbons (that is,hydrocarbons containing seven carbon atoms, such as heptane).

At 405, a chemical composition (in mole or mass fractions of thechemical groups, such as light, medium, and heavy) of the fluid to beextracted from the subterranean zone 14, a temperature of thesubterranean zone 14, and a pressure of the subterranean zone 14 (allassociated with a future time point) is determined using a non-linearauto-regressive neural network model based on the data obtained at 401and data obtained previously.

At 407, a machine-learning based classification model is used todetermine whether the future chemical composition provides a stablesingle phase (in contrast to two-phase) at the future temperature andthe future pressure of the subterranean zone 14. The machine-learningbased classification model can be calibrated or tuned with availableexperimental data (such as data obtained at 401) or offset well data. Ifa stable single phase is determined, the fluid extraction monitoringcontinues (that is, the method 400 returns to 401). If an unstablesingle phase (that is, two phase) is determined, then the method 400continues to 409.

At 409, a flow rate of fluid extraction from the subterranean zone 14 isadjusted. For example, a throttle valve (such as the valve 70 in FIG. 1)is adjusted to decrease the rate of fluid extraction from thesubterranean zone 14. The method 400 can then return to 401. The method400 can continue to cycle as long as fluid is being extracted from thesubterranean zone

FIG. 5 is a flow chart illustrating a method 500 for monitoring fluidextraction from a subterranean zone, such as the subterranean zone 14. Asample of the produced hydrocarbon can be obtained, for example, usingthe sampling device 60 installed on the well head 24 at the surface 25.At 501, measurements of the chemical composition of the sample, atemperature of the subterranean zone 14, and a pressure of thesubterranean zone 14 are obtained. For example, the chemical compositionof the sample is obtained by utilizing the measurement device 62. Thechemical composition can be measured using gas chromatography and massspectrometry. The chemical composition can be determined as a mixture ofchemical species in mole or mass fractions. The temperature can bemeasured, for example, by the temperature sensor 51 located downholewithin the subterranean zone 14. The pressure can be measured, forexample, by the pressure sensor 50 located downhole within thesubterranean zone 14.

Steps 503, 505, 507, and 509 can be performed by one or more processors(for example, the processor 605 of the control system 600). At 503, achemical composition of the fluid to be extracted from the subterraneanzone 14, a temperature of the subterranean zone 14, and a pressure (P₁)of the subterranean zone 14 (all associated with a future time point)are determined using a non-linear auto-regressive neural network modelbased on the data obtained at 501 and data obtained previously.

At 505, a dew point pressure (P₂) of the fluid to be extracted from thesubterranean zone 14 at the future point is determined using amachine-learning based regression model. The machine-learning basedregression model can be based on artificial neural networks, supportvector machines, or Gaussian processes.

At 507, the future dew point pressure (P₂) is compared to the futurepressure (P₁) of the subterranean zone 14. If the future pressure of thesubterranean zone 14 is greater than the future dew point pressure (thatis, if P₁>P₂), then the fluid extraction monitoring continues (that is,the method 500 returns to 501). If the future pressure of thesubterranean zone 14 is less than or equal to the future dew pointpressure (that is, if P₁<P₂), then the method 500 continues to 509.

At 509, a flow rate of fluid extraction from the subterranean zone 14 isadjusted. For example, a throttle (such as the valve 70 in FIG. 1) valveis adjusted to decrease the rate of fluid extraction from thesubterranean zone 14. The method 500 can then return to 501. The method500 can continue to cycle as long as fluid is being extracted from thesubterranean zone

FIG. 6 is a block diagram of an example computer system 600 used toprovide computational functionalities associated with describedalgorithms, methods, functions, processes, flows, and procedures, asdescribed in this specification, according to an implementation. Theillustrated computer 602 is intended to encompass any computing devicesuch as a server, desktop computer, laptop/notebook computer, one ormore processors within these devices, or any other suitable processingdevice, including physical or virtual instances (or both) of thecomputing device. Additionally, the computer 602 can include a computerthat includes an input device, such as a keypad, keyboard, touch screen,or other device that can accept user information, and an output devicethat conveys information associated with the operation of the computer602, including digital data, visual, audio information, or a combinationof information.

The computer 602 includes a processor 605. Although illustrated as asingle processor 605 in FIG. 6, two or more processors may be usedaccording to particular needs, desires, or particular implementations ofthe computer 602. Generally, the processor 605 executes instructions andmanipulates data to perform the operations of the computer 602 and anyalgorithms, methods, functions, processes, flows, and procedures asdescribed in this specification.

The computer 602 can also include a database 606 that can hold data forthe computer 602 or other components (or a combination of both) that canbe connected to the network. Although illustrated as a single database606 in FIG. 6, two or more databases (of the same or combination oftypes) can be used according to particular needs, desires, or particularimplementations of the computer 602 and the described functionality.While database 606 is illustrated as an integral component of thecomputer 602, in alternative implementations, database 606 can beexternal to the computer 602. The database 606 can include variousmodelling functions for droplet shapes, such as circular, conic section,polynomial, and Young-Laplace models.

The computer 602 includes an interface 604. Although illustrated as asingle interface 604 in FIG. 6, two or more interfaces 604 may be usedaccording to particular needs, desires, or particular implementations ofthe computer 602. The interface 604 is used by the computer 602 forcommunicating with other systems that are connected to the network in adistributed environment. Generally, the interface 604 comprises logicencoded in software or hardware (or a combination of software andhardware) and is operable to communicate with the network. Morespecifically, the interface 604 may comprise software supporting one ormore communication protocols associated with communications such thatthe network or interface's hardware is operable to communicate physicalsignals within and outside of the illustrated computer 602.

The computer 602 also includes a memory 607 that can hold data for thecomputer 602 or other components (or a combination of both) that can beconnected to the network. Although illustrated as a single memory 607 inFIG. 6, two or more memories 607 (of the same or combination of types)can be used according to particular needs, desires, or particularimplementations of the computer 602 and the described functionality.While memory 607 is illustrated as an integral component of the computer602, in alternative implementations, memory 607 can be external to thecomputer 602.

The memory 607 stores computer-readable instructions executable by theprocessor 605 that, when executed, cause the processor 605 to performoperations including associating a measured chemical composition, ameasured temperature, and a measured pressure with a time point;incorporating the measured chemical composition, the measuredtemperature, and the measured pressure into a set of historical data;determining a chemical composition of a fluid to be extracted from asubterranean zone (such as the subterranean zone 14) at a future timepoint based on the set of historical data; determining a presence of aliquid phase in the fluid to be extracted at least based on thedetermined chemical composition; and transmitting a signal thatcorresponds to a decrease in a flow rate of the fluid extracted from thesubterranean zone 14 based on a determination of the presence of theliquid phase.

The computer 602 can also include a power supply 614. The power supply614 can include a rechargeable or non-rechargeable battery that can beconfigured to be either user- or non-user-replaceable. The power supply614 can be hard-wired. There may be any number of computers 602associated with, or external to, a computer system containing computer602, each computer 602 communicating over the network.

Further, the term “client,” “user,” “operator,” and other appropriateterminology may be used interchangeably, as appropriate, withoutdeparting from the scope of this specification. Moreover, thisspecification contemplates that many users may use one computer 602, orthat one user may use multiple computers 602.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of the subjectmatter or on the scope of what may be claimed, but rather asdescriptions of features that may be specific to particularimplementations. Certain features that are described in thisspecification in the context of separate implementations can also beimplemented, in combination, in a single implementation. Conversely,various features that are described in the context of a singleimplementation can also be implemented in multiple implementations,separately, or in any suitable sub-combination. Moreover, althoughpreviously described features may be described as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can, in some cases, be excised from thecombination, and the claimed combination may be directed to asub-combination or variation of a sub-combination.

Particular implementations of the subject matter have been described.Other implementations, alterations, and permutations of the describedimplementations are within the scope of the following claims as will beapparent to those skilled in the art. While operations are depicted inthe drawings or claims in a particular order, this should not beunderstood as requiring that such operations be performed in theparticular order shown or in sequential order, or that all illustratedoperations be performed (some operations may be considered optional), toachieve desirable results.

Accordingly, the previously described example implementations do notdefine or constrain this specification. Other changes, substitutions,and alterations are also possible without departing from the spirit andscope of this specification.

What is claimed is:
 1. A method for real-time monitoring of fluid extraction from a subterranean zone, the method comprising: obtaining a sample of a fluid from the subterranean zone while the fluid is being extracted from the subterranean zone; measuring a chemical composition of the sample of the fluid; measuring a temperature and a pressure of the subterranean zone; by one or more processors: associating the measured chemical composition, the measured temperature, and the measured pressure with a time point; incorporating the measured chemical composition, the measured temperature, and the measured pressure into a set of historical data; determining a chemical composition of a fluid to be extracted from the subterranean zone at a future time point based on the set of historical data; and determining a presence of a liquid phase in the fluid to be extracted from the subterranean zone at the future time point at least based on the determined chemical composition; and adjusting a flow rate of the fluid being extracted from the subterranean zone in response to determining the presence of the liquid phase in the fluid to be extracted from the subterranean zone at the future time point.
 2. The method of claim 1, further comprising adjusting a mathematical model of the fluid based on the set of historical data, wherein the mathematical model represents at least one of a temperature, a pressure, a composition, and a physical property of the fluid.
 3. The method of claim 2, further comprising using the model to determine a temperature and a pressure of the subterranean zone at the future time point.
 4. The method of claim 3, wherein the chemical composition of the sample of the fluid is measured by at least one of gas chromatography or mass spectrometry.
 5. The method of claim 4, wherein measuring the chemical composition of the sample of the fluid comprises measuring at least one of a mole fraction or a mass fraction of a chemical species of the sample of the fluid.
 6. The method of claim 4, wherein measuring the chemical composition of the sample of the fluid comprises measuring at least one of a mole fraction or a mass fraction of a group of chemical species of the sample of the fluid.
 7. The method of claim 4, wherein the model is an auto-regressive neural network model.
 8. The method of claim 4, wherein determining the presence of the liquid phase in the fluid to be extracted from the subterranean zone at the future time point comprises: determining a dew point pressure of the fluid to be extracted from the subterranean zone at the future time point; and comparing the determined dew point pressure of the fluid to be extracted from the subterranean zone at the future time point with the determined pressure of the subterranean zone at the future time point.
 9. The method of claim 8, wherein the dew point pressure corresponds to the measured temperature of the subterranean zone.
 10. The method of claim 8, wherein the dew point pressure corresponds to the determined temperature of the subterranean zone at the future time point. 